home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmOptions
- BorderStyle = 3 'Fixed Dialog
- Caption = "Multi Play Options"
- ClientHeight = 2490
- ClientLeft = 4200
- ClientTop = 3165
- ClientWidth = 3120
- Height = 2895
- Icon = "OPTIONS.frx":0000
- Left = 4140
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2490
- ScaleWidth = 3120
- ShowInTaskbar = 0 'False
- Top = 2820
- Width = 3240
- Begin VB.Frame Frame1
- Caption = "START WITH"
- Height = 1455
- Left = 60
- TabIndex = 4
- Top = 60
- Width = 2955
- Begin VB.TextBox txtResume
- Height = 285
- Left = 2040
- Locked = -1 'True
- TabIndex = 10
- Top = 1080
- Visible = 0 'False
- Width = 735
- End
- Begin VB.OptionButton optMethod
- Caption = "Resume at last played:"
- Enabled = 0 'False
- Height = 195
- Index = 3
- Left = 120
- TabIndex = 9
- Top = 1140
- Width = 1935
- End
- Begin VB.TextBox txtMethod
- Height = 285
- Left = 1320
- TabIndex = 8
- Top = 660
- Visible = 0 'False
- Width = 1455
- End
- Begin VB.OptionButton optMethod
- Caption = "File name"
- Height = 195
- Index = 2
- Left = 120
- TabIndex = 7
- Top = 840
- Width = 1095
- End
- Begin VB.OptionButton optMethod
- Caption = "File number"
- Height = 195
- Index = 1
- Left = 120
- TabIndex = 6
- Top = 540
- Width = 1155
- End
- Begin VB.OptionButton optMethod
- Caption = "First file"
- Height = 195
- Index = 0
- Left = 120
- TabIndex = 5
- Top = 240
- Value = -1 'True
- Width = 2175
- End
- End
- Begin VB.CommandButton cmdCancel
- Caption = "&Cancel"
- Height = 435
- Left = 1590
- TabIndex = 1
- Top = 1980
- Width = 1455
- End
- Begin VB.CommandButton cmdOK
- Caption = "&OK"
- Height = 435
- Left = 60
- TabIndex = 0
- Top = 1980
- Width = 1455
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "( .mid will be added automatically )"
- Height = 195
- Left = 0
- TabIndex = 3
- Top = 1740
- Visible = 0 'False
- Width = 3105
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Height = 195
- Left = 0
- TabIndex = 2
- Top = 1560
- Width = 3105
- End
- Attribute VB_Name = "frmOptions"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub cmdCancel_Click()
- Cancelled = True
- Unload frmOptions
- End Sub
- Private Sub cmdOK_Click()
- 'If first choice is chosen (default) then
- If optMethod(0) = True Then
- 'set the flag
- StartWhere = 0
- 'Otherwise, if second choice is chosen then
- ElseIf optMethod(1) = True Then
- 'check to see if it is a numeric value
- If Not IsNumeric(txtMethod.Text) Then
- 'If not then
- Beep
-
- '& tell user
- MsgBox "Not Numeric", 48, "Multi Play Options"
-
- 'Reset the text
- txtMethod.Text = ""
-
- 'Restore focus
- txtMethod.SetFocus
-
- '& exit
- Exit Sub
- 'Otherwise, if it is not in the current file range then
- ElseIf Val(txtMethod.Text) < 1 Or Val(txtMethod.Text) > MCIApp.File1.ListCount Then
- Beep
-
- '& tell user
- MsgBox "Number out of range", 48, "Multi Play Options"
-
- 'Reset the text
- txtMethod.Text = ""
-
- 'Reset the focus
- txtMethod.SetFocus
-
- '& exit
- Exit Sub
- 'Otherwise, it was valid so,
- Else
- 'Set the flag
- StartWhere = 1
-
- '& identify file
- StartNumber = Val(txtMethod.Text)
- End If
- 'Otherwise, if third choice was chosen then
- ElseIf optMethod(2).value = True Then
- 'set the flag
- StartWhere = 2
-
- 'Check for a file extension
- If InStr(".mid", txtMethod.Text) Then
- 'that's the whole filename
- StartName = txtMethod.Text
- 'Otherwise,
- Else
- 'add the extension to the text
- StartName = txtMethod.Text & ".mid"
- End If
- 'Otherwise, if fourth choice is chosen then
- ElseIf optMethod(3).value = True Then
- 'Set the flag
- StartWhere = 3
-
- 'Identify the file
- FileMark = Val(txtResume.Text) - 1
- End If
- '& finish
- Unload frmOptions
- End Sub
- Private Sub Form_Load()
- 'Centre form
- Top = (Screen.Height - Height) / 2
- Left = (Screen.Width - Width) / 2
- End Sub
- Private Sub optMethod_Click(Index As Integer)
- 'If first option then
- If Index = 0 Then
- 'reset text & caption
- txtMethod.Text = ""
- Label2.Caption = ""
-
- '& hide them
- Label3.Visible = False
- txtMethod.Visible = False
- 'Otherwise if second option then
- ElseIf Index = 1 Then
- 'reset text & caption
- txtMethod.Visible = True
- txtMethod.Text = ""
-
- 'Show only appropriate label
- Label3.Visible = False
- Label2.Caption = "Enter a file number && click OK"
-
- '& set the focus
- txtMethod.SetFocus
- 'Otherwise, if third option then
- ElseIf Index = 2 Then
- 'show the text box
- txtMethod.Visible = True
-
- 'Reset the text
- txtMethod.Text = ""
-
- 'Set appropriate caption
- Label2.Caption = "Enter a file name && click OK"
-
- '& show it
- Label3.Visible = True
-
- 'Set the focus
- txtMethod.SetFocus
- 'Otherwise, if fourth option then
- ElseIf Index = 3 Then
- 'Reset text & caption
- txtMethod.Text = ""
- Label2.Caption = ""
-
- 'show appropriate text box
- Label3.Visible = False
- txtMethod.Visible = False
- txtResume.Visible = True
- End If
- End Sub
- Private Sub txtMethod_KeyPress(KeyAscii As Integer)
- 'Stop that beep
- If KeyAscii = 13 Then
- KeyAscii = 0
- End If
- End Sub
- Private Sub txtResume_KeyPress(KeyAscii As Integer)
- 'Stop that beep
- If KeyAscii = 13 Then
- KeyAscii = 0
- End If
- End Sub
-